import sys

sys.path.append(r"D:\Myprog")
from DDbot import Core, FILE, AUDIO, PICTURE, TEXT, Message
from Panda.reply import *

robotCode = "dingfjytrhvnxlicvkbw"
robotSecret = "5Ie_qScP3oQqN-qqdBI6MY_JS3Dh78N4lHjJH65Wf2bCbpxTXc_bmpcl_GYTWOqA"
bot = Core(robotCode, robotSecret)


@bot.msg_register([FILE, AUDIO, PICTURE], is_private=True)
def download_file(msg: Message):
    logger.info(msg)
    for key, value in msg.items():
        print(f"{key:<15}:  {value}")

    msg.user.get_down_url(msg)


@bot.msg_register([TEXT], is_private=True, is_group=True)
def reply_private(msg: Message):
    logger.info(msg)
    for key, value in msg.items():
        print(f"{key:<15}:  {value}")

    check_msg(msg, msg.user, True)


bot.run()
